package com.bwie.controller;

import com.bwie.mapper.UserMapper;
import com.bwie.service.UserService;
import com.bwie.utils.R;
import com.bwie.vo.loginForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/index")
public class IndexController {


    @Autowired
    UserService userService;


    @PostMapping("/sendCodePhone")
    public R sendCodePhone(@RequestBody loginForm loginForm){
       return userService.sendCodePhone(loginForm);
    }

    @PostMapping("/loginPhone")
    public R loginPhone(@RequestBody loginForm loginForm){
        return userService.loginPhone(loginForm);
    }


}
